<template>
    <div>
        <van-nav-bar
                title="位置"
                left-text="返回"
                left-arrow
                @click-left="onClickLeft"
        />
    </div>
    <!--    1.创建标签-->
    <div id="dvmap"></div>
</template>

<script>
    export default {
        name: "SightMapView",
        mounted() {
            //页面加载就调用
            var map = new BMapGL.Map("dvmap");
            console.log(map);
            // 创建地图实例
            var point = new BMapGL.Point(118.928313, 29.593028);
            // 创建点坐标
            map.centerAndZoom(point, 15);
            // 初始化地图，设置中心点坐标和地图级别
        },
        setup(){
            const onClickLeft = () => history.back();
            return {
                onClickLeft,
            };
        },
    }
</script>

<style scoped>
    #dvmap{
        height: 30rem;
        width: 100%;
    }
</style>